﻿using Yitter.IdGenerator;

namespace Futuret.Core.Utils;

/// <summary>
///  Author: Riva
///  Date: 2023/7/11 17:29 
///  Description: Id工具
/// </summary>
public class IdUtil
{
    /// <summary>
    ///     获取longId
    /// </summary>
    /// <returns></returns>
    public static long GetLongId()
    {
        return YitIdHelper.NextId();
    }

    /// <summary>
    ///     获取Guid
    /// </summary>
    /// <returns></returns>
    public static Guid GetGuidId()
    {
        return Guid.NewGuid();
    }

    /// <summary>
    ///     获取stringId
    /// </summary>
    /// <returns></returns>
    public static string GetStringId()
    {
        return GetGuidId().ToString("N");
    }
}